/* pytch-ide.css */


/******************************************************************************/

html { height: 100%; }

body {
    height: 100%;
    background-color: #dde;
    margin: 0px 8px;
    font-family: 'Roboto', sans-serif;
    display: flex;
    justify-content: space-between;
    flex-direction: column;
}

#code-and-stage {
    margin-top: 8px;
    display: flex;
    flex-direction: row;
}

#editor {
    border: 1px solid lightgray;
    margin: 0px;
    flex-grow: 1;
    font-size: 16px;
}

#stage-with-buttons {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    margin: 0px 0px 0px 8px;
}

#stage-controls {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    padding: 0px 0px 8px 0px;
}

#pytch-canvas {
    border: 1px solid lightgray;
    background: white;
}

#info-panel-tabs {
    margin: 0px;
    padding: 0px;
    display: flex;
    flex-direction: row;
}

#info-panel-content {
    overflow: auto;
    background-color: white;
    margin: 0px 0px 8px 0px;
    padding: 0px;
    flex-grow: 1;
    flex-shrink: 1;
}


/******************************************************************************/

#stage-controls > div {
    cursor: pointer;
    user-select: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-radius: 6px;
}

#stage-controls > div { height: 36px; }

#stage-controls > div > p {
    text-align: center;
    color: black;
    margin: 8px;
}

#build-button { min-width: 8em; }
#green-flag, #red-stop, #info-menu { width: 48px; }

#build-button { background-color: lightgreen; }
#green-flag { background-color: green; }
#red-stop { background-color: red; }
#info-menu { background-color: #ff8; }


/******************************************************************************/

#info-panel-tabs p {
    margin: 8px 16px 0px 16px;
    padding: 8px;
    background-color: #eee;
    font-size: 120%;
    color: #666;
    cursor: pointer;
    border-radius: 8px 8px 0px 0px;
    user-select: none;
}

#info-panel-tabs p.current {
    background-color: white;
    color: #000;
}

#info-panel-content div.tab-content {
    height: 100%;
    display: none;
    padding: 0px;
    overflow-x: auto;
    overflow-y: auto;
}

#info-panel-content div.tab-content.current {
    display: flex;
}

#info-panel-content div.tab-content span.info {
    font-style: italic;
}


/******************************************************************************/

#exceptions-explanation {
    margin: 2ex 2em;
}

#exceptions-container {
    /* Will be adjusted by JS if/when there are errors to show: */
    display: none;
}

#exceptions-container p.errors-intro {
    font-size: 133%;
    font-weight: bold;
    margin-left: 2em;
}

#exceptions-container ul {
    margin-left: 2em;
    padding-left: 0em;
    list-style: none;
}

#exceptions-container ul li.one-error {
    margin: 3ex 0em;
    border-radius: 6px;
    padding: 16px;
    width: 48em;
    background-color: #faa;
}

#exceptions-container li.one-error ul {
    list-style: circle;
}

#exceptions-container li.one-error ul li {
    margin-left: 2em;
}

#exceptions-container li.one-error p {
    margin: 1ex 1em;
}

.err-traceback li, .err-message li {
    padding: 6px;
}

.err-traceback li code {
    font-family: Monaco, Menlo, "Ubuntu Mono", Consolas, source-code-pro, monospace;
    font-weight: bold;
    background-color: #ddd;
    padding: 4px;
    border-radius: 4px;
}

.err-traceback span.error-loc {
    font-weight: bold;
    background-color: #ffa;
    padding: 4px;
    border-radius: 4px;
    cursor: pointer;
    user-select: none;
}


/******************************************************************************/

/* TODO: Use this more generally? */
.click-target {
    cursor: pointer;
    user-select: none;
}

#tab-pane-tutorial {
    display: flex;
    flex-direction: row;
}

#tab-pane-tutorial-list .tutorial-list-container {
    width: 100%;
}

#tab-pane-tutorial-list .tutorial-summary {
    overflow: auto;
    padding: 16px 24px;
    max-width: 48em;
    margin-left: auto;
    margin-right: auto;
    margin-top: 3ex;
    background-color: #cec;
    border-radius: 6px;
}

#tab-pane-tutorial-list .tutorial-summary h1 {
    font-size: 133%;
}

#tab-pane-tutorial-list .tutorial-summary .image-container {
    float: right;
    margin-left: 2em;
    margin-right: 1em;
}

#tab-pane-tutorial-list .tutorial-summary .image-container img {
    cursor: pointer;
    border-radius: 6px;
}

#tab-pane-tutorial-list .tutorial-summary .navigation {
    margin-top: 3ex;
}

#tab-pane-tutorial .placeholder-until-one-chosen {
    margin: 3ex 3em;
}

#tab-pane-tutorial .ToC {
    display: none;
    flex-grow: 0;
    flex-shrink: 0;
    margin: 0px;
    overflow-y: auto;
}

#tab-pane-tutorial .chapter-container {
    display: none;
    flex-grow: 1;
    flex-shrink: 1;
    height: 100%;
    margin: 0px;
    overflow-y: auto;
}

#tab-pane-tutorial .ToC p {
    margin-left: 2em;
    font-weight: bold;
    font-size: 110%;
}

#tab-pane-tutorial .ToC ul {
    list-style: none;
    width: 14em;
    padding: 0px;
    margin: 0px 3em 0px 2em;
}

#tab-pane-tutorial .ToC li {
    padding: 0.5ex 1em;
    font-size: 110%;
    line-height: 150%;
    margin-top: 2ex;
    background-color: #f0f0f0;
    cursor: pointer;
}

#tab-pane-tutorial .ToC li.shown {
    background-color: #cfc;
}

#tab-pane-tutorial .chapter-content,
#tab-pane-tutorial .front-matter {
    margin: 0px 3em;
}

#tab-pane-tutorial .front-matter h1 {
    background-color: inherit;
    color: black;
    text-align: left;
    margin-left: 0px;
}

#tab-pane-tutorial .chapter-content h2 {
    font-size: 125%;
    margin: 2ex 0px 1ex 0px;
}

#tab-pane-tutorial .navigation-buttons {
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
}

#tab-pane-tutorial-list .navigation,
#tab-pane-tutorial .navigation {
    cursor: pointer;
    user-select: none;
    line-height: 133%;
    padding: 1ex;
    border-radius: 4px;
}

#tab-pane-tutorial .nav-prev {
    background-color: #bbb;
    border: 1px solid #888;
}

#tab-pane-tutorial-list .nav-next,
#tab-pane-tutorial .nav-next {
    width: 12em;
    background-color: #6d7;
    border: 1px solid #3a4;
}


/******************************************************************************/

div.patch-container {
    margin-left: 1em;
}

div.patch-container > h1.decoration {
    padding: 1.5ex 1em;
    margin: 0px;
    background-color: #f7f7f7;
    text-align: left;
    font-size: 100%;
    color: #000;
}

div.patch, div.patch > table {
    background-color: #f7f7f7;
    border-spacing: 0px;
    margin: 0px;
}

div.patch > table {
    padding-bottom: 2.5ex;
}

div.patch > table tr,
div.patch > table tr td {
    padding: 0px;
    margin: 0px;
    border: none;
}

div.patch > table td.linenum {
    width: 3em;
    padding-left: 1em;
    padding-right: 1em;
    text-align: right;
    color: #666;
}

div.patch > table pre {
    line-height: 100%;
    padding: 2px;
    margin: 0px;
    border: none;
    border-radius: 0px;
    background-color: inherit;
}

div.patch > table td {
    position: relative;
}

div.patch > table td div.copy-button {
    z-index: 1;
    cursor: pointer;
    user-select: none;
    position: absolute;
    top: 0px;
    right: 0px;
}

div.patch > table td div.copy-button p {
    margin: 4px 4px 0px 0px;
    padding: 4px;
    background-color: #293;
    color: white;
    border-radius: 4px;
}

div.patch > table tr td:nth-child(3) { width: 100%; }
div.patch > table tr td:nth-child(3) pre::before { margin-right: 1em; }
div.patch > table tbody.diff-del tr { background-color: #ffcaca; }
div.patch > table tbody.diff-del tr td:nth-child(3) pre::before { content: '-'; }
div.patch > table tbody.diff-add tr { background-color: #caffca; }
div.patch > table tbody.diff-add tr td:nth-child(3) pre::before { content: '+'; }
div.patch > table tbody.diff-unch tr { color: #666; background-color: #f7f7f7; }
div.patch > table tbody.diff-unch tr td:nth-child(3) pre::before { content: ' '; }
